<template>
  <el-form :inline="true" class="search-form">
    <slot></slot>
    <el-form-item class="search-buttons">
      <el-button type="primary" @click="$emit('search')">查询</el-button>
      <el-button @click="$emit('reset')">重置</el-button>
    </el-form-item>
  </el-form>
</template>

<style lang="scss" scoped>
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px;
  margin-bottom: 0;
  background: #fff;

  .el-form-item {
    margin-bottom: 0;
    margin-right: 10px;
  }

  .search-buttons {
    margin-left: auto;
    margin-right: 0;
  }
}
</style> 